<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="./style.css" />
<script language="javascript">
function selectall() {

		var allbox = document.getElementsByName('ids');

		if (document.getElementById('checkcan').checked == true)

			document.getElementById('checkcan').checked = false;

		for (i = 0; i < allbox.length; i++) {

			if (allbox[i].type == "checkbox" && allbox[i] != null)

				allbox[i].checked = true;

		}

	}

	function cancelselectall() {

		var allbox = document.getElementsByName('ids');

		if (document.getElementById('checkall').checked == true)

			document.getElementById('checkall').checked = false;

		for (i = 0; i < allbox.length; i++) {

			if (allbox[i].type == "checkbox" && allbox[i] != null)

				allbox[i].checked = false;

		}

	}

	function selectfan() {

		if (document.getElementById('checkall').checked == true)

			document.getElementById('checkall').checked = false;

		if (document.getElementById('checkcan').checked == true)

			document.getElementById('checkcan').checked = false;

		var allbox = document.getElementsByName('ids');

		for (i = 0; i < allbox.length; i++) {

			if (allbox[i].type == "checkbox" && allbox[i] != null) {

				if (allbox[i].checked == true)

					allbox[i].checked = false;

				else

					allbox[i].checked = true;

			}

		}
	}

</script>





</head>
<body>
<div id="main">
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="reward!toAdd">【添加惩奖信息】</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="reward!rewardList">【高级查询】</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href="reward!rewardPageList">【查询全部】</a>
 
 <div>
  <form action="reward!searchById" method="post"><input type="text" name="id"/><input type="submit" value="根据ID精确查询"/></form>
  <form action="train!findByTitle" method="post"><input type="text" name="title"/><input type="submit" value="根据主题精确查询"/></form>
 </div>

 
 
  
<div>
<form action="reward!deletese" method="post">
  <table>
  <tr>
  <td><input type="checkbox" id="checkall"></input></td>
  <td>ID</td>
  <td>惩奖主题</td>
  <td>惩奖金额</td>
  <td>惩奖时间</td>
  <td>惩奖内容</td>
  <td>惩奖类型</td>
  <td>删除记录</td>
  <td>查看详情</td>
  <td></td>
  </tr>
  <s:iterator value="pagelist.list">

	<tr>
			<td><input type="checkbox" name="ids"  value="<s:property value="id" />" /></td>
			<td><s:property value="id" /></td>
			<td><s:property value="title" /></td>
			<td><s:property value="penalty" /></td>
			<td><s:property value="time" /></td>
			<td><s:property value="content" /></td>
			<td><s:property value="type" /></td>
			
			<td><a href="reward!delete?id=<s:property value="id" />">delete</a></td>
			<td><a href="reward!showem?id=<s:property value="id" />">more</a></td>

		</tr>





</s:iterator>
</table>

<s:property value="reward.time" />



<p><span>全选</span>
    <input id="checkall" type="checkbox" class="checkbox" onclick="selectall()"/>
    <span>取消全选</span>
    <input id="checkcan" type="checkbox" class="checkbox" onclick="cancelselectall()"/>
    <span>反转</span>
    <input id="checkcfan" type="checkbox" class="checkbox" onclick="selectfan()"/>
</p>
<input type="submit" value="删除所选" /> 
</form>



 <s:if test="%{ids?=null}">
  <span>ID为</span><s:property value="ids"/>的记录已经被删除
 </s:if>
</div>



<s:if test="%{pagelist.pageNum!=1}">
<s:a href="%{pagelist.url}%{pagelist.para}pagelist.pageNum=%{pagelist.pagePretNum}">上一页</s:a>
</s:if>

<s:iterator value="pagelist.pageNums" status="st">
<s:if test="%{pagelist.pageNum==#st.index+1}">
<s:property/>
</s:if>
<s:else>
<s:a href="%{pagelist.url}%{pagelist.para}pagelist.pageNum=%{#st.index+1}"><s:property/></s:a>
</s:else>
</s:iterator>
<s:if test="%{pagelist.pageNum!=pagelist.pageTotalCount}">
<s:a href="%{pagelist.url}%{pagelist.para}pagelist.pageNum=%{pagelist.pageNextNum}">下一页</s:a>
</s:if>


<s:debug></s:debug>

</div>
</body>
</html>

